@extends("Admin.Manage.article_manage")
@section("body")
@section("main")

    <div class="col-sm-10">
        <div class="panel panel-default">
            <div class="panel-body">
                @foreach($data as $u)
                <form action="/_user_uArticle" method="post">
                    <div class="col-sm-6 form-group">
                        <label>文章名</label>
                        <input class="form-control" placeholder="" name="article_title" type="text" value="{{$u->article_title}}">

                    </div>
                    <div class="col-sm-6 form-group">
                        <label>文章简介</label>
                        <input class="form-control" placeholder="" name="article_intro" type="text" value="{{$u->article_intro}}">
                    </div>
                    <div class="col-sm-12 form-group">
                        <input type="hidden" name="_token" value="{{ csrf_token() }}">
                        <label>文章分类</label>
                        <select name="article_class" class="form-control">
                            @foreach($class as $c)
                                <option value="{{$c->class_id}}">{{$c->class_name}}</option>
                            @endforeach
                        </select>
                        </br \>
                        <input type="submit" class="btn btn-danger" value="确认修改">
                        <input type="hidden" name="id" value="{{$u->article_id}}">
                    </div>
                    <div class="col-sm-12 form-group">
                        <script id="container" name="article_detail" type="text/plain" >
                        </script>
                        <!-- 配置文件 -->
                        <script type="text/javascript" src="/ueditor/ueditor.config.js"></script>
                        <!-- 编辑器源码文件 -->
                        <script type="text/javascript" src="/ueditor/ueditor.all.js"></script>
                        <!-- 实例化编辑器 -->
                        <script type="text/javascript">
                            var ue = UE.getEditor('container',{
                                initialFrameHeight: 600});
                            ue.ready(function(){
                              ue.setContent('<?php echo $u->article_detail?>');
                            });
                        </script>
                    </div>
                </form>
                    @endforeach
            </div>
        </div>
    </div>
@append
@append